//
//  XJToolClass.h
//  XJMCustomer
//
//  Created by Mr.hu on 2017/10/9.
//  Copyright © 2017年 Mr.hu. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AppDelegate.h"
#import <CommonCrypto/CommonDigest.h>
#import "sys/utsname.h"

@interface XJToolClass : NSObject

+ (BOOL)isUrl:(NSString *)UrlBool;

#pragma mark -- 头像
+ (NSString *)getAvater;
+ (void)saveAvater:(NSString *)avater;
+ (void)removeAvater;

//当前用户手机号
+ (void)SaveCurrentPhone:(NSString *)phonenumber;
+ (NSString *)getCurrentPhoneStr;
+ (void)removePhonenumber;
//昵称
+ (void)saveNickname:(NSString *)Nickname;
+ (NSString *)getNickname;
+ (void)removeNickname;
//过滤掉字典中的null
+(id)changeType:(id)myObj;
//保存导航信息
+ (void)saveNavArr:(NSMutableArray *)navArr;
+ (NSMutableArray *)getNavArr;
+ (void)removeNavArr;
//保存地图搜索记录
+ (void)saveSearchArr:(NSMutableArray *)Arr;
+ (NSMutableArray *)getSearchArr;
+ (void)removeSearchArr;

+ (void)saveBrightIndoorSearchArr:(NSMutableArray *)Arr;
+ (NSMutableArray *)getBrightIndoorSearchArr;
+ (void)removeBrightIndoorSearchArr;
//密码
+ (void)savePasswd:(NSString *)password;
+ (NSString *)getPassword;
+ (void)removePasswd;
//账号
+ (void)saveAccount:(NSString *)account;
+ (NSString *)getAccount;
+ (void)removeAccount;
//保存头像地址
+ (void)removeTicketCheck;
+ (void)saveticketCheck:(NSString *)ticketCheck;
+ (NSString *)getTicketCheck;
//保存头像地址
+ (void)removeHeadImg;
+ (void)saveHeadImg:(NSString *)imgUrl;
+ (NSString *)getHeadImg;
//保存用户设备识别码
+ (NSString *)getUUID;
+ (void)saveUUID:(NSString *)uuidStr;
//保存用户信息
+ (NSDictionary *)getUserDic;
+ (void)saveUserDic:(NSDictionary *)userDic;
+ (void)removeUserdic;
//16：52格式的时间换算成整数
+(NSInteger)timeChangeint:(NSString*)time;

+ (void)removeUserId;
+ (void)saveUserId:(NSString *)userId;

+ (UIViewController*)viewController:(UIView *)view;
+(AppDelegate *)appdelegate;

//判断邮箱是否可用
+(BOOL)isValidateEmail:(NSString *)email;
//添加meun导航

+ (void)setAnimationOfSwingAroundWith:(UIView *)view;

+ (void)fastAnimationOfSwingAroundWith:(UIView *)view;

+ (NSString *)getVerificationCode;

//提示成功提问 成功收藏 成功点赞
+ (void)tipAnimationWith:(NSString *)title;
+ (void)bigShowMessage:(NSString *)message;
//判断合法的电话号码
+ (BOOL)checkTel:(NSString *)str;

//判断输入是否为空格
+(BOOL)isEmpty:(NSString *) str;

//交互式请求登录
+(BOOL) isLogin:(UIViewController *)viewController;
//获取用户id
+ (NSString *)getUserId;
//保存token
+ (NSString *)getToken;
+ (void)saveToken:(NSString *)tokenStr;
+ (void)removeToken;
//判断是否为整形数字
+ (BOOL)isPureInt:(NSString *)string;

+(NSString *)urlencode:(NSString *) str;

+ (NSDictionary *)pictureWidthAndHeight:(NSString *)str;

//压缩图片
+ (UIImage *)imageWithMaxSide:(CGFloat)length sourceImage:(UIImage *)image;

//根据生日得到星座
+ (NSString*)getConstellationFromBirthday:(NSDate*)birthday;

// 根据颜色16进制数值得到UIColor
+ (UIColor *)colorFromHexRGB:(NSString *)inColorString;
+ (NSString *)md5:(NSString *)str;
+ (NSString *)sha1:(NSString *)str;
+(NSString *)number:(float) price;
//隐藏nav的左边title
+(void)setbackNavagationItemwith:(UIViewController *)vc;

+(int)compareOneDay:(NSDate *)oneDay withAnotherDay:(NSDate *)anotherDay;
//银行卡号验证
+ (BOOL)checkCardNo:(NSString*) cardNo;
+ (NSString *)showVisibleCard:(NSString *)cardNumber;
//字符串空格转换成数组
+(NSArray *)spaceStrChangeArr:(NSString *)str;
//字符串逗号转换成数组
+(NSArray *)commaStrChangeArr:(NSString *)str;
//判断是否有中文
+ (BOOL)IsChinese:(NSString *)str;
//日期月份英文简称
+(NSString *)mon:(NSString *)data;
//时间戳转字符串"-- yyyy-MM-dd"
+(NSString*)stringFromTimeInterval:(NSTimeInterval)time;

//时间戳转字符串"-- MM-dd HH:mm"
+(NSString*)stringFromTimeIntervalThree:(NSTimeInterval)time;
//时间戳转字符串"//"
+(NSString*)stringFromTimeIntervalTwo:(NSTimeInterval)time;

+ (NSString *)getCurrentTimeString:(NSString *)dataFormate Date:(NSDate *)date;

//图片处理
+ (UIImage *)scaleToSize:(UIImage *)originImage Width:(CGFloat)scaleWidth;
+ (UIImage*) GetImageWithColor:(UIColor*)color andHeight:(CGFloat)height;
//武汉火车站楼层转换
+ (NSString *)setfloor:(long )floor;
+ (NSMutableArray *)AddDefaultMutArr;
//加阴影
+ (void)putShadowOnView:(UIView *)view Radius:(CGFloat)radius Color:(CGColorRef)color ShadowRadius:(CGFloat)sRadius Opacity:(float)opacity;
#pragma mark--显示开启定位
+ (void)showLocationOpenTip:(UIViewController *)viewControler;
//获取手机型号
+(NSString *)iphoneType;

@end
